package com.mallsystem.common.service;

import com.github.pagehelper.PageInfo;
import com.mallsystem.common.bean.Goods;
import com.mallsystem.common.exception.AllException;

public interface GoodsService {
    //添加
    void insert(Goods goods) throws AllException;
    //根据id删除
    void delete(Integer id) throws AllException;
    //根据id修改
    void update(Goods goods) throws AllException;
    //根据id查询
    Goods selectById(Integer id);
    Goods selectById1(Integer id);
    //搜索 - 分页查询
    PageInfo<Goods> selectByCondition(Goods condition,Integer pageNum,Integer pageSize);
    PageInfo<Goods> selectByCondition1(Goods condition,Integer pageNum,Integer pageSize);
    //修改上架下架状态
    boolean updateStatus(Goods goods) throws AllException;
}
